﻿using Codeflows.Results;
using Codeflows.Tracking;

namespace Codeflows.Dispatch.ResultHandlers
{
    abstract class ResultHandler<T> : ResultHandlerBase where T : Result
    {   
        protected abstract void Handle(CodeflowInstance instance, T result);

        protected override void RunHandler(CodeflowInstance instance, Result result)
        {
            Handle(instance, (T)result);
        }
    }
}